const path = require('path');

module.exports = {
  entry: './src/main.js',
  mode: 'development',
  output: {
      filename: 'bundle.js'
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader']
      },
      {
        test: /\.(png|svg|jpg|gif)$/,
        use: 'file-loader'
      },
      {
        test: /\.(htm|html)$/i,
        use:[ 'html-withimg-loader']
      },

    ]
  },
  devServer: {
    static: {
      directory: path.join(__dirname, 'public'),
    },
    compress: false,
    port: 8080,
  },
};
